export default {
  mounted() {
    window.addEventListener('resize', this.resizeTheChart)
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.resizeTheChart)
  },
  methods: {
    resizeTheChart() {
      if (this.$refs.creditChart) {
        this.$refs.creditChart.resize()
      }
      if (this.$refs.creditChartOne) {
        this.$refs.creditChartOne.resize()
      }
      if (this.$refs.creditChartTwo) {
        this.$refs.creditChartTwo.resize()
      }
    }
  }
}
